
const map={
		'/visitor/bind':'bind()',
		'/visitor/unbind':'unbind()',
	}
class JQUserController extends  global.JQBaseController {
    constructor(url,conn,req_obj) {
		super(url,conn,req_obj);
	
       // super.name = name;
    }
	
	
   //绑定手机号
   async bind(){
   	
   	const service = global.JQService.instance(
   		'order_service/create',this.conn,this.req_obj,this.params);
   	let data =service.do_action();
   	return data;
   	//console.log('obj::' + obj);
   }
   
   //绑定手机号
   async unbind(){
   	
   	const service = global.JQService.instance(
   		'order_service/create',this.conn,this.req_obj,this.params);
   	let data =service.do_action();
   	return data;
   	//console.log('obj::' + obj);
   }
   
   
   async  dispatch() {
   	super.dispatch();
   	
   	let req = this.req_obj;
   	let func = MAP[this.url];
   	
   	if(func){
   		console.log('dispatch'+ '  ' +  func);
   		func = 'this.'+func;
   		console.log('dispatch'+ '  ' +  func);
   		let res_data = await eval(func);
   		return res_data;
   	}else return null;
   	
   	
   }
   
	
	
}
module.exports = JQUserController;